<template>
  <div class="wrapper" @click="update">
    <router-view>
 <image :src="logoUrl" class="logo"></image>
    <text class="title">Hello {{target}}</text>

    </router-view>
   
    <!-- <web ref="webview" :src="url" class="webview" @pagestart="start" @pagefinish="finish" @error="error"></web>
    <a class="button" href="http://dotwe.org/raw/dist/3e0e40f9ddad79f98cd236753965ffd8.js">
      <text class="text">Jump</text>
    </a> -->
    <!-- <div>
       <text class="button" @click="goback()">返回</text>
    </div> -->
  </div>
</template>

<style>
  .wrapper { align-items: center; margin-top: 120px; }
  .title { font-size: 48px; }
  .logo { width: 360px; height: 82px; }
  .webview {
    margin-left: 75px;
    width: 600px;
    height: 750px;
    border-width: 2px;
    border-style: solid;
    border-color: #41B883;
  }
</style>

<script>
  export default {
    data: {
      logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png',
      target: 'Wrld',
      url : 'https://m.alibaba.com',
      value: 'https://m.alibaba.com'
    },
    methods: {
      update: function (e) {
        this.target = 'Weex'
        console.log('target:', this.target)
      },
      goback:function(){

          this.$router.go(-1)

      }
      // loadURL (event) {
      //   this.url = this.value
      //   modal.toast({ message: 'load url:' + this.url })
      //   setTimeout(() => {
      //     console.log('will go back.')
      //     modal.toast({ message: 'will go back' })
      //     webview.goBack(this.$refs.webview)
      //   }, 10000)
      // },
      // reload (event) {
      //   console.log('will reload webview')
      //   modal.toast({ message: 'reload' })
      //   webview.reload(this.$refs.webview)
      // },
      // start (event) {
      //   console.log('pagestart', event)
      //   modal.toast({ message: 'pagestart' })
      // },
      // finish (event) {
      //   console.log('pagefinish', event)
      //   modal.toast({ message: 'pagefinish' })
      // },
      // error (event) {
      //   console.log('error', event)
      //   modal.toast({ message: 'error' })
      // }
    }
  }
</script>
